<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <title><#if entity.romotionId??>编辑<#else>新增</#if>扫描-活动/奖品统计</title>
    <#include "/view/admin/head.html"/>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />


    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/js/bootstrapValidator.min.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/lang/zh_CN.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-validator-0.5.3/css/bootstrapValidator.min.css" />


    <style type="text/css">
        .list-path {
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;
        }

        .table-class {
            width: 90%;
            text-align: center;
            border: 1px solid #afd9ee;
            margin: 0 auto;
            margin-top: 50px;
        }

        table th {
            width: 20%;
            background-color: #d9edf7;
            text-align: right;
        }

        table td {
            width: 20%;
            text-align: left;
        }


    </style>
    <script type="text/javascript">

        $(function(){
            //初始化














                $('#createtime').datetimepicker({language: 'zh-CN' });



            $('#czjromotionForm').bootstrapValidator({
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {



                    
                type:{
                    message: '输入核销类型出错',
                    validators:{
                        notEmpty: {
                            message: '核销类型不能为空'
                        },
                        stringLength:{
                            max: 2,
                            message: '核销类型不能超过 2个字符'
                        },
                        regexp: {
                            regexp: /^[0-9]+$/,
                                    message:'核销类型只能是数字'
                        }
                    }
                }

                    ,
                remoname:{
                    message: '输入核销人姓名出错',
                    validators:{
                        notEmpty: {
                            message: '核销人姓名不能为空'
                        },
                        stringLength:{
                            max: 19,
                            message: '核销人姓名不能超过 19个字符'
                        }
                    }
                }

                    ,
                remophone:{
                    message: '输入核销人手机出错',
                    validators:{
                        notEmpty: {
                            message: '核销人手机不能为空'
                        },
                        stringLength:{
                            max: 19,
                            message: '核销人手机不能超过 19个字符'
                        }
                    }
                }

                    ,
                region:{
                    message: '输入核销场所出错',
                    validators:{
                        notEmpty: {
                            message: '核销场所不能为空'
                        },
                        stringLength:{
                            max: 20,
                            message: '核销场所不能超过 20个字符'
                        }
                    }
                }



                    ,
                telephone:{
                    message: '输入用户手机出错',
                    validators:{
                        notEmpty: {
                            message: '用户手机不能为空'
                        },
                        stringLength:{
                            max: 50,
                            message: '用户手机不能超过 50个字符'
                        }
                    }
                }

                    ,
                nickname:{
                    message: '输入用户昵称出错',
                    validators:{
                        notEmpty: {
                            message: '用户昵称不能为空'
                        },
                        stringLength:{
                            max: 50,
                            message: '用户昵称不能超过 50个字符'
                        }
                    }
                }







                    ,
                festName:{
                    message: '输入活动名称出错',
                    validators:{
                        notEmpty: {
                            message: '活动名称不能为空'
                        },
                        stringLength:{
                            max: 50,
                            message: '活动名称不能超过 50个字符'
                        }
                    }
                }

                    ,
                num:{
                    message: '输入使用数量出错',
                    validators:{
                        notEmpty: {
                            message: '使用数量不能为空'
                        },
                        stringLength:{
                            max: 11,
                            message: '使用数量不能超过 11个字符'
                        }
                    }
                }

                    ,
                price:{
                        message: '输入活动单价出错',
                        validators:{
                            notEmpty: {
                                message: '活动单价不能为空'
                            },
                            stringLength:{
                                max: 11,
                                message: '活动单价不能超过 11个字符'
                            },
                            regexp: {
                                regexp: /^[1-9][0-9]*$|^[1-9][0-9]*\.[0-9]{1,2}$|^0\.[0-9]{1,2}$/,
                                message:'活动单价只能是金额'
                            }
                        }
                    }



                }
            });


        });

    </script>
</head>
<body>
<#include "/view/admin/listnav.html"/>


<div class="table-class">
    <#include "/view/admin/opermsg.html"/>
    <form id="czjromotionForm" action="${base}/czjromotion/save.do"
     >
    <table class="table table-bordered">

                        <input type="hidden" style="display: none" name="romotionId" value="${entity.romotionId!}"/>


                <tr>
                <th>核销类型</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="type" name="type" placeholder="请输入核销类型" value="${entity.type!}">
                    </div>
                </td>
                

                
                <th>核销人姓名</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="remoname" name="remoname" placeholder="请输入核销人姓名" value="${entity.remoname!}">
                    </div>
                </td>
                </tr>

                <tr>
                <th>核销人手机</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="remophone" name="remophone" placeholder="请输入核销人手机" value="${entity.remophone!}">
                    </div>
                </td>
                

                
                <th>核销场所</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="region" name="region" placeholder="请输入核销场所" value="${entity.region!}">
                    </div>
                </td>
                </tr>

                        <input type="hidden" style="display: none" name="userinfoId" value="${entity.userinfoId!}"/>


                <tr>
                <th>用户手机</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="telephone" name="telephone" placeholder="请输入用户手机" value="${entity.telephone!}">
                    </div>
                </td>
                

                
                <th>用户昵称</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="nickname" name="nickname" placeholder="请输入用户昵称" value="${entity.nickname!}">
                    </div>
                </td>
                </tr>

                        <input type="hidden" style="display: none" name="activityId" value="${entity.activityId!}"/>


                        <input type="hidden" style="display: none" name="activityNum" value="${entity.activityNum!}"/>


                        <input type="hidden" style="display: none" name="festId" value="${entity.festId!}"/>


                <tr>
                <th>活动名称</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="festName" name="festName" placeholder="请输入活动名称" value="${entity.festName!}">
                    </div>
                </td>
                

                
                <th>使用数量</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="num" name="num" placeholder="请输入使用数量" value="${entity.num!}">
                    </div>
                </td>
                </tr>

                <tr>
                <th>活动单价</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="price" name="price" placeholder="请输入活动单价" value="${entity.price!}">
                    </div>
                </td>
                

                
                <th>领取时间</th>
                <td>
                    <input type="text" class="form-control" value="<#if (entity.createtime)?? >${entity.createtime?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtime" name="createtime" data-date-format="yyyy-mm-dd hh:ii:ss">
                </td>
                </tr>


        <tr>
            <td colspan="4" width="100%" style="text-align: center;">
                <input type="submit" class="btn btn-success " value="保存"/>
                <span style="width: 20px;">&nbsp;</span>
                <a class="btn btn-danger " href="javascript:window.history.go(-1)">
                   </span>返回</a>
            </td>
        </tr>

    </table>
</form>




</div>

<script type="text/javascript">

</script>


</body>
</html>
